import Vue from 'vue';
import Router from 'vue-router';
import App from '@/App';
import HomePage from '@/pages/home/HomePage';
import Heat from '@/pages/home/Heat';
import WeekFree from '@/pages/home/WeekFree';
import Competition from '@/pages/home/Competition';
import ArticleDetails from '@/pages/home/ArticleDetails';
import HeroDetails from '@/pages/home/HeroDetails';

import AssistPage from '@/pages/assist/AssistPage';
import InsSim from '@/pages/assist/InsSim';
import HeroInfos from '@/pages/assist/HeroInfos';
import EquipInfos from '@/pages/assist/EquipInfos';
import HeroRanking from '@/pages/assist/HeroRanking';

import Discover from '@/pages/discover/DiscoverPage'

import Gift from '@/pages/gift/Gift'
Vue.use(Router);
export default new Router({
  mode: 'hash',
  routes: [{
      path: '/home',
      component: HomePage,
      children: [{
        path: 'heat',
        name: 'Heat',
        component: Heat,
      }, {
        path: 'weekfree',
        name: 'WeekFree',
        component: WeekFree,
      }, {
        path: 'competition',
        name: 'Competition',
        component: Competition,
      }]
    },
    {
      path: '/articledetails',
      name: 'ArticleDetails',
      component: ArticleDetails,
      meta: {
        hideTab: true
      }
    },
    {
      path: '/herodetails',
      name: 'HeroDetails',
      component: HeroDetails,
      meta: {
        hideTab: true
      }
    },
    // 辅助
    {
      path: '/assist',
      name: 'AssistPage',
      component: AssistPage,
    },
    {
      path: '/inssim',
      name: 'InsSim',
      component: InsSim,
      meta: {
        hideTab: true
      }
    },
    {
      path: '/heroinfos',
      name: 'HeroInfos',
      component: HeroInfos,
      meta: {
        hideTab: true
      }
    },
    {
      path: '/equipinfos',
      name: 'EquipInfos',
      component: EquipInfos,
      meta: {
        hideTab: true
      }
    },
    {
      path: '/heroranking',
      name: 'HeroRanking',
      component: HeroRanking,
      meta: {
        hideTab: true
      }
    },
    {
      path: '/discover',
      name: 'Discover',
      component: Discover,
    },
    {
      path: '/strategy',
      name: 'Strategy',
      component: Competition,
    },
    {
      path: '/gift',
      name: 'Gift',
      component: Gift,
    }
  ]
})

// export default new Router({
//   // mode: 'history',
//   routes: [{
//     path: '/',
//     name: '首页',
//     component: App,
//     children: [{
//         path: '/home',
//         name: '精选',
//         component: HomePage,
//         children: [{
//           path: 'heat',
//           name: '热门',
//           component: Heat,
//         }, {
//           path: 'competition',
//           name: '赛事',
//           component: Competition,
//         }]
//       },
//       {
//         path: '/articledetails',
//         name: 'ArticleDetails',
//         component: ArticleDetails,
//         meta: {
//           hideTab: true
//         }
//       },
//       {
//         path: '/herodetails',
//         name: 'HeroDetails',
//         component: HeroDetails,
//         meta: {
//           hideTab: true
//         }
//       },
//       // 辅助
//       {
//         path: '/assist',
//         name: 'AssistPage',
//         component: AssistPage,
//       },
//       {
//         path: '/inssim',
//         name: 'InsSim',
//         component: InsSim,
//         meta: {
//           hideTab: true
//         }
//       },
//       {
//         path: '/heroinfos',
//         name: 'HeroInfos',
//         component: HeroInfos,
//         meta: {
//           hideTab: true
//         }
//       },
//       {
//         path: '/equipinfos',
//         name: 'EquipInfos',
//         component: EquipInfos,
//         meta: {
//           hideTab: true
//         }
//       },
//       {
//         path: '/heroranking',
//         name: 'HeroRanking',
//         component: HeroRanking,
//         meta: {
//           hideTab: true
//         }
//       }
//     ]
//   }]
// })
